using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class PER_SequenceMap : EntityTypeConfiguration<PER_Sequence>
    {
        public PER_SequenceMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(50);

            this.Property(t => t.Code)
                .HasMaxLength(10);

            this.Property(t => t.Section)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("PER_Sequence");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.Tooth).HasColumnName("Tooth");
            this.Property(t => t.Section).HasColumnName("Section");
        }
    }
}
